1. Field of the Invention
The present invention relates mainly to a relay server that enables communication to be performed between apparatuses connected to different LANs (Local Area Networks).
2. Description of the Related Art
Conventionally, a communication technology called a virtual private network (Virtual Private Network, VPN) has been known, which allows communication to be performed between LANs installed in physically distant places. Japanese Patent Application Laid-Open No. 2010-268312 shows an example in which a relay server, a communication terminal, and the like, are connected to each of a plurality of LANs installed in physically distant places. With use of the VPN, a communication terminal is able to transmit a packet to a communication terminal connected to another LAN. More specifically, a packet transmitted by a communication terminal is firstly sent to a relay server belonging to a LAN that the communication terminal belongs to. This relay server transmits (forwards) the packet, via Internet, to a relay server belonging to a LAN that a destination communication terminal belongs to. The relay server receives the packet, and transmits (forwards) the packet to the destination communication terminal.
Use of the VPN enables another LAN located in a distant place to be used as if it is a directly-connected network.
In a LAN, not only the above-described VPN communication but also communication using no VPN is often performed. In such a case, a packet is firstly transmitted not to a relay server but to an apparatus (for example, a router) that functions as a default gateway. The apparatus that functions as a default gateway forwards the received packet in accordance with a destination of the packet.
Thus, in a case of communication with use of the VPN, it is necessary that a relay server is designated as a primary destination of a packet, and in a case of communication without use of the VPN, it is necessary that an apparatus that functions as a default gateway is designated as a primary destination of a packet. For this purpose, it is necessary to preset a gateway table in which a final destination of a packet and a primary destination of the packet are associated with each other.
However, in many cases, it is not until a VPN is built that an address of a communication partner through the VPN is revealed. Therefore, the gateway table needs to be updated each time a VPN is built, which results in a complicated process.